Cooking gap control of a cooking apparatus

ABSTRACT

A method of controlling a cooking apparatus includes identifying an initial thickness of a food product on a lower heating plate of the cooking apparatus and calculating a difference between an initial gap value corresponding to the initial thickness of the food product and a predefined final gap value. The method includes controlling at least one of a pressure of at least one of an upper heating plate and a lower heating plate on the food product, a rate of descent of the upper heating plate toward the lower heating plate, and a rate of ascent of the lower heating plate toward the upper heating plate based on the calculated difference between the initial gap value and the predefined final gap value.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.14/775,294, filed Sep. 11, 2015, which is a U.S. nationalization under35 U.S.C. § 371 of International Application No. PCT/US2014/028661,filed Mar. 14, 2014, which claims priority from U.S. ProvisionalApplication No. 61/798,241, filed on Mar. 15, 2013. The disclosures setforth in the referenced applications are incorporated herein byreference in their entireties.

BACKGROUND OF THE INVENTION

Embodiments of the invention relate to a cooking apparatus having anupper and lower heating plate, and in particular to controlling thecooking of a food product based on pressure or descent rate of a heatingunit.

Grills for cooking apply heat from a lower heating plate and from anupper heating plate to opposite sides of a food item to decrease cooktimes and to cook food evenly. In conventional systems, the gap betweenthe upper heating plate and lower heating plate is set based on a foodtype, and food is cooked at the predetermined gap for a predeterminedperiod of time. However, although food products are provided withinpredetermined specifications, such as having a thickness within apredetermined range, the food product thicknesses may vary. When foodproducts having varying thicknesses are all cooked at the same gap forthe same period of time, cooking quality may vary among the differentfood products.

BRIEF DESCRIPTION OF THE INVENTION

Embodiments of the present invention include a method of controlling acooking apparatus. The method includes identifying an initial thicknessof a food product on a lower heating plate of the cooking apparatus andcalculating a difference between an initial gap value corresponding tothe initial thickness of the food product and a predefined final gapvalue. The method includes controlling at least one of a pressure of atleast one of an upper heating, plate and a lower heating plate on thefood product and a rate of descent of the upper heating plate toward thelower heating plate based on the calculated difference between theinitial gap value and the predefined final gap value.

Embodiments of the invention further include a cooking apparatusincluding a base including a lower heating plate and an upper heatingunit including an upper heating plate. The apparatus also includes acontroller configured to identify an initial thickness of a food producton the lower heating plate of the cooking apparatus, calculate adifference between an initial gap value corresponding to the initialthickness of the food product and a predefined final gap value, andcontrol at least one of a pressure of at least one of the upper heatingplate and the lower heating plate on the food product and a rate ofdescent of the upper heating plate toward the lower heating plate basedon the calculated difference between the initial gap value and thepredefined final gap value.

BRIEF DESCRIPTION OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The foregoing and other features, and advantages ofthe invention are apparent from the following detailed description takenin conjunction with the accompanying drawings in which:

FIG. 1 is a block diagram of a cooking apparatus according to oneembodiment of the invention;

FIG. 2 is a block diagram of a cooking apparatus according to anotherembodiment of the invention; and

FIG. 3 is a flowchart illustrating a method according to an embodimentof the invention.

DETAILED DESCRIPTION OF THE INVENTION

Conventional grilling apparatuses heat food from above and below, butmay heat food unevenly due to different food product thicknesses.Embodiments of the invention relate to controlling the pressure and rateof descent of a cooking apparatus to heat food products of varyingheights evenly.

FIG. 1 illustrates a cooking apparatus 100 according to an embodiment ofthe invention. In one embodiment, the cooking apparatus 100 is agrilling apparatus for grilling food. The cooking apparatus 100 includesa base 110 including a housing 111 that rests on the ground, floor oranother surface. The base 110 also includes a lower heating plate 112.The cooking apparatus 100 also includes an upper heating unit 120including a housing 121 and an upper heating plate 122.

In FIG. 1 , one configuration of a cooking apparatus 100 is illustratedincluding a single heating plate 112 on a housing 111 and a single upperheating unit 120. However, embodiments of the invention encompass anyconfiguration of base 110, lower heating plate 112, upper heating unit120 and upper heating plate 122, including multiple lower or upperheating plates or multiple upper heating units 120.

A mounting structure 140 mounts the upper heating unit 120 to a fixedsurface, such as the housing 111 of the base 110 as illustrated in FIG.1 . Alternatively, the mounting structure 140 may be fixed to any othersurface, such as a ceiling, a wall or the ground. In the embodimentillustrated in FIG. 1 , the mounting structure 140 includes a mountingbase 141 and an actuator mounting part 142. In one embodiment, themounting base 141 is moveable in a linear direction to linearly raiseand lower the upper heating unit 120. In one embodiment, the actuatormounting part 142 is rotatable with respect to the mounting base 141 toraise and lower one end of the upper heating unit 120 with respect tothe lower heating plate 112.

In the embodiment illustrated in FIG. 1 , the upper heating unit 120 issuspended from the actuator mounting part 142 by actuators 153 and 154.The actuators 153 and 154 may be, for example, linear actuators, such asmechanical, electrical or hydraulic actuators that are controlled toraise and lower the upper heating unit 120 with respect to the base 110.The actuators 153 and 154 control a tilt, angle or attitude of the upperheating plate 122. The actuators 153 and 154 may also apply pressure tothe upper heating plate 122, so that the upper heating plate 122 mayapply pressure to a food product on the lower heating plate 112 that isgreater than just a weight of the upper heating unit 120.

The base 110 may also include an actuator support part 143 and actuators151 and 152. The actuators 151 and 152 may be controlled to control thetilt, angle or attitude of the lower heating plate 112. In analternative embodiment, the base 110 does not include actuators 151 and152, and instead the lower heating plate 112 is supported by a fixedsurface or support structure.

The cooking apparatus 100 includes at least one sensor 132 a to detect afood product on the lower heating plate 112. The sensor 132 a may be,for example, a photo sensor, optical sensor or video sensor to captureimages of a food product, and the controller 131 may identify the foodproduct based on the images. In another embodiment, the sensor 132 a maybe an optical sensor or acoustic sensor to detect a height of a foodproduct on the lower heating plate 112. In one embodiment, the sensor132 a detects the type of food product based on a thickness of the foodproduct. While a few examples of sensors are provided, the sensor 132 amay be any type of sensor capable of detecting information about thefood product, about the location of the upper or lower heating plates122 or 112 or about the gap between the upper and lower heating plates122 and 112. In addition, while the sensor 132 a is illustrates as beingconnected to the base 110, the sensor 132 a may be located at anyposition capable of identifying a food product, including connected tothe supper structure 140 or connected to the upper heating unit 120.

Embodiments of the invention encompass additional sensors 132 b to 132 ein the base 110 to detect characteristics of a food product or thecooking apparatus 100 and sensors 132 f to 132 i in the upper heatingunit 120 to detect characteristics of a food product or the cookingapparatus 100. One or more of the sensors 132 b to 132 i may be apressure sensor to detect a pressure exerted against a food product onthe lower heating plate 112. In addition, one or more of the sensors 132b to 132 i may be a position-detection sensor, such as an inclinometer,capable of detecting a position, angle or attitude of the upper heatingplate 122 and the lower heating plate 112. In addition, one or more ofthe sensors 132 b to 132 i may be an accelerometer to detect a rate ofdescent or ascent of the upper heating unit 120 or the lower heatingplate 112. In addition, the sensor 132 a may be an optical sensor todetect the position of the upper heating unit 120 or a rate of descentof the upper heating unit 120,

FIG. 1 illustrates the sensors 132 b to 132 e positioned between a lowersurface 113 and an upper sensor surface 114. The upper sensor surface114 provides a buffer between the sensors 132 b to 132 e and the lowerheating plate 112. In an embodiment in which one of the sensors 132 b to132 e is a pressure sensor, one or more of the mounting base 141 and theactuators 151, 152, 153 and 154 may bring the upper heating plate 122into contact with a food product on the lower heating plate 112. Onceboth the upper heating plate 122 and lower heating plate 112 are incontact with the food product, any additional movement of one or both ofthe upper heating plate 122 and the lower heating plate 112 towards eachother results in pressure being registered in one of the pressuresensors 132 b to 132 e. The pressure may be monitored by the controller131 which may control the mounting base 141 and the actuators 151 to 154based on the detected pressure.

Similarly, the sensors 132 f to 132 i are positioned between a lowersurface 123 and an upper sensor surface 124. The lower sensor surface123 provides a buffer between the sensors 132 f to 132 i and the upperheating plate 122. In an embodiment in which one of the sensors 132 f to132 i is a pressure sensor, one or more of the mounting base 141 and theactuators 151, 152, 153 and 154 may bring the upper heating plate 122into contact with a food product on the lower heating plate 112. Onceboth the upper heating plate 122 and lower heating plate 112 are incontact with the food product, any additional movement of one or both ofthe upper heating plate 122 and the lower heating plate 112 towards eachother results in pressure being registered in one of the pressuresensors 132 f to 132 i. The pressure may be monitored by the controller131 which may control the mounting base 141 and the actuators 151 to 154based on the detected pressure.

Embodiments of the invention encompass any type of sensor capable ofproviding position data or other cooking data to the controller 131.Examples of sensors include inclinometers, accelerometers, pressuresensors, temperature sensors, acoustic sensors and optical sensors. Inembodiments of the invention, the controller 131 controls the positionof the upper heating unit 120 and the lower heating plate 112 based onthe received sensor data.

In operation, a food product is placed on the lower heating plate 112.One of the sensors 132 a to 132 i may detect the type of food productbased on size, weight, image recognition, thickness or any otherrecognition process. Alternatively, a user may enter a control programselection indicating a type of food product that is placed on the lowerheating plate 112. A cooking process may be initiated based on a userinput, by sensing movement of the upper heating unit 120 to bepositioned such that the upper heating plate 122 is above the lowerheating plate 112, or by a combination of detecting a food product onthe lower heating plate 112 and sensing that the upper heating plate 122is in a cooking position. In embodiments of the invention, theidentification of the food product by one or more of the sensors 132 ato 132 i may occur before or after the upper heating plate 122 islowered towards the lower heating plate 112, and before or after thecooking process is initiated by a user.

One or more of the sensors 132 a to 132 i calculates an initialthickness of the food product on the lower heating plate 112. Thecontroller 131 calculates a difference between an initial gap valuecorresponding to the initial thickness of the food product and apredefined final gap value based on the detected food. For example, whena first type of food product is detected, the controller 131 may set thefinal gap value between the upper and lower heating plates 122 and 112to a first gap value. The controller 131 then calculates a differencebetween the initial gap value, based on the measured initial thicknessof the food product, and the stored first gap value. The controller 131controls at least one of the pressure exerted against the food productby one or both of the upper and lower heating plates 122 and 112 and therate of descent of the upper heating plate 122 based on the calculateddifference between the measured initial thickness of the food productand the stored or predefined first gap value.

If a second type of food product is detected, then a second gap valuedifferent than the first gap value may be used as the final gap value.In addition, if food products having different initial thicknesses aredetected, then the controller 131 may determine if the food products arethe same or different. If the products are the same, then the controller131 sets the final gap value to be the same for the food products, butmay control one or both of the pressure and the rate of descent of theupper and lower heating plates 122 and 112 to cook the food producthaving the greater initial thickness for longer than the food producthaving the lesser initial thickness.

In one embodiment, the lower heating plate 112 is fixed and not moveableby actuators. In such an embodiment, the controller 131 controls onlythe pressure exerted by the upper heating plate 122 against the foodproduct on the lower heating plate 112, or the rate of descent of theupper heating plate 122 towards the lower heating plate 112 based on thecalculated difference between the initial gap value corresponding to themeasured initial thickness of the food product and the final gap value,which is a stored or predetermined value based on the type of foodproduct on the lower heating plate 112. In embodiments of the invention,the rate of descent of the upper heating plate 122 towards the lowerheating plate 112 is controlled after the upper heating plate 122contacts at least one food product on the lower heating plate 112. Therate of descent may be controlled to increase a cook time of a thickerfood product, for example.

In another embodiment, the upper heating plate 122 is fixed and notmoveable by actuators in a cooking operation. For example, the mountingstructure may move the upper heating unit 120 into a cooking position inwhich the upper heating plate 122 is positioned above and substantiallyparallel to the lower heating plate 112, and then the position of thelower heating plate 112 may be adjusted to apply pressure to a foodproduct on the lower heating plate 112 while the upper heating plate 122remains stationary. In yet another embodiment, both the upper heatingplate 122 and the lower heating plate 112 may be moveable by actuatorsduring a cooking operation to apply pressure to a food product on thelower heating plate 112.

The cooking process may be completed by sensing that the food product iscooked, based on an elapsed cook time or based on a combination of aposition of the upper and lower heating plates 122 and 112 (such asbeing positioned to have the final gap value) and a predetermined cooktime. The controller 131 may then generate a notice, such as a sound orvisual notice, that the cooking process is finished, or the controller131 may control the mounting structure 140 to lift the upper heatingunit 120 up and away from the lower heating plate 112.

In another embodiment illustrated in FIG. 2 , the upper heating unit 120is suspended from an actuator mounting part 242 of a support structure240 by cables 253 and 254. The support structure includes a basemounting portion 241, which may include a linear actuator to raise andlower the actuator mounting part 242. The upper heating plate 122 ismounted to a lower surface 123 of the housing 121, and the lower surface123 is suspended by the cables 253 and 254. The cables 253 and 254 areconnected to rotating devices 251 and 252 which are mounted to theactuator mounting part 242. In one embodiment, the rotating devices 251and 252 are motors, or pulleys that are driven by cables 253 and 254controlled by motors. Since the upper heating plate 122 is held insuspension by the cables 253 and 254, the only pressure applied to anupper surface of a food product on the lower heating plate 112, is, atmost, a pressure corresponding to a weight of the upper heating unit120. Accordingly, in the embodiment illustrated in FIG. 2 , controllingthe pressure of the upper heating plate 122 on a food product includes,at most, increasing a pressure up to a pressure corresponding to theweight of the upper heating unit 120.

The rotation devices 251 and 252 are configured to raise and lower theupper heating plate 122 based on the rotation of the rotation devices251 and 252. As the rotation devices 251 and 252 rotate in onedirection, the cables 253 and 254 are fed out from a spool and a part ofthe lower surface 123 connected to the cables 253 and 254 and acorresponding part of the upper heating plate 122 are lowered, tiltingthe upper heating plate 122. As the rotation devices 251 and 252 rotatein an opposite direction, the cables 253 and 254 are retrieved by thespool and the part of the lower surface 123 connected to the cables 253and 254 and the corresponding part of the upper heating plate 122 areraised, tilting the upper heating plate 122.

The combination of the rotation of the first and second rotation devices251 and 252 allows the upper heating plate 122 to be positioned in awide variety of angles and orientations, such the upper heating plate122 may tilted, around multiple crossing axes, at a positive angle and anegative angle relative to a horizontal plane based on the rotation ofthe first and second rotation devices 251 and 252.

The cooking apparatus 100 further includes the controller 131 to controlthe rotation devices 251 and 252. The controller 131 includes aprocessing circuit, programmable logic, memory and any other circuitryfor receiving, analyzing processing and transmitting data.

Operation of the cooking apparatus 200 of FIG. 2 is similar to thecooking apparatus 100 of FIG. 1 , except that a maximum pressure thatmay be exerted against the food product corresponds to the weight of theupper heating unit 120. However, the controller 131 may still controlone or more of the pressure (up to the maximum pressure) applied by theupper heating unit 120 onto a food product and a rate of descent of theupper heating plate 122 towards a lower heating plate 112 as discussedabove with respect to FIG. 1 .

FIG. 3 illustrates a method according to an embodiment of the invention.In block 301, a cook cycle of a cooking apparatus is initiated. The cookcycle may be initiated by a user input or by sensing preset conditionsto begin a cook cycle. For example, the preset conditions may includedetecting that a food product has been placed on a lower heating plateand an upper heating plate has been lowered into a cooking positionabove the lower heating plate (block 302).

In block 303 a food product is located on the lower heating plate of thecooking apparatus, and in block 304 the product is identified. In oneembodiment, the product is identified by the thickness of the product.For example, the cooking apparatus may be used to cook hamburger pattiesand the particular type of hamburger patty may be identified based onthe thickness of the hamburger patty. Alternatively, the food productmay be identified by image recognition, weight or by any other method.

In block 305, a finished gap is determined based on the identified foodproduct. Each food product may have a finished gap associated with thefood product. For example, when the food product identified, acontroller may look up in memory the finished gap that is associatedwith the detected food product. A difference is detected between thefinished gap value and the initial thickness of the food product. Thedifference may be calculated as an absolute value or as a percentage.

In block 306, one or more of the pressure and the rate of descent of anupper heating plate is controlled based on the calculated differencebetween the initial gap value, or the initial food product thickness,and the predetermined final gap value. For example, if the difference isrelatively high, then the pressure or rate of descent may be decreasedto increase a cook time of a thicker food product. Conversely, if theinitial gap value is relatively low, then the pressure or rate ofdescent may be increased to decrease a cook time of a thinner foodproduct. In an embodiment in which multiple food products of varyingthicknesses are detected, a thicker food product may be cooked for alonger period of time than a thinner food product by controlling thepressure or rate of descent of an upper heating plate. The control ofthe rate of descent and pressure of the upper or lower heating platesimproves a cooked food product quality by taking into account variationsin food product thicknesses from a standard food product thickness, andvariations in food product thicknesses of different food products thatare on the lower heating plate at the same time. In art alternativeembodiment, the rate of ascent of a lower heating plate may becontrolled instead of the rate of descent of the upper heating plate. Inyet another embodiment, a combination of the rate of ascent of the lowerheating plate and a rate of descent of the upper heating plate iscontrolled.

In block 307, it is determined whether a condition is met to end thecook cycle. In one embodiment, the cook cycle ends after a predeterminedperiod of time has elapsed. In another embodiment, the cook cycle endsonly after a predetermined period of time has elapsed with the upper andlower heating plates in their final gap position. The upper and lowerheating plates are moved into the final gap position after at least oneof the upper and lower heating plates has been controlled based onpressure or rate of descent corresponding to the identified food productthickness. If the condition is met, the upper heating unit including theupper heating plate is raised in block 308. Otherwise, the cookingprocess continues in block 306 with the control of pressure and rate ofdescent of the upper heating plate.

In embodiments of the invention, a thickness of a food product ismeasured and used to determine a difference between the initialthickness and a final gap value. The difference is used to control atleast one of pressure applied to a food product and descent rate of anupper heating unit to evenly cook the food product. Controlling thepressure or rate of descent, as opposed to just moving the upper andlower heating plates into a final gap value for a set period of time,provides for improved quality of a final food product by allowing forincreased cook times of thicker food products and decreased cook timesof thinner food products, which may result in a more even cookingquality on the food products of varying thicknesses.

While the invention has been described in detail in connection with onlya limited number of embodiments, it should be readily understood thatthe invention is not limited to such disclosed embodiments. Rather, theinvention can be modified to incorporate any number of variations,alterations, substitutions or equivalent arrangements not heretoforedescribed, but which are commensurate with the spirit and scope of theinvention. Additionally, while various embodiments of the invention havebeen described, it is to be understood that aspects of the invention mayinclude only some of the described embodiments. Accordingly, theinvention is not to be seen as limited by the foregoing description, butis only limited by the scope of the appended claims.

The invention claimed is:
 1. A method of controlling a cookingapparatus, comprising: initiating a cooking cycle by positioning a foodproduct upon a lower heating plate of a cooking appliance; detecting afood product on a lower heating plate with at least one sensor, whereinthe sensor is one of a photo sensor, an optical sensor, an acousticsensor, or a video sensor; identifying an initial thickness of a foodproduct on the lower heating plate of the cooking apparatus; identifyinga predetermined cook time for a food product; calculating whether adifference exists between an initial gap value corresponding to theinitial thickness of the food product and a predefined final gap value;when the step of calculating the difference between the initial gapvalue corresponding to the initial thickness of the food product and thepredefined final gap value results in a difference being calculated,adjusting the position of the lower heating plate with respect to anupper heating plate to result in compression of the food productdisposed upon the lower heating plate until there is no longer adifference between the thickness of the food product and the predefinedfinal gap value, and controlling a rate of ascent of the lower heatingplate toward the upper heating plate based on the calculated differencebetween the initial gap value and the predefined final gap value;controlling the rate of ascent of the lower heating plate until thepredefined gap value is reached; and sensing that the food product hasbeen cooked based upon a combination of the predetermined final gapvalue being reached and the predetermined cook time being elapsed. 2.The method of claim 1, wherein identifying the initial thickness of thefood product includes identifying the initial thickness of a first foodproduct and a second food product, the first food product having athickness greater than the second food product, and controlling the rateof ascent of the lower heating plate includes adjusting at least one ofa pressure applied to a food product resting upon the lower heatingplate by ascent of the lower heating plate toward the upper heatingplate or the rate of ascent to cook the first food product for a periodof time longer than the second food product.
 3. The method of claim 1,wherein identifying the initial thickness of the food product includesidentifying an initial thickness of a first food product and a secondfood product, the first food product having an initial thickness greaterthan the second food product, the method further comprising: identifyingthe first and second food products being of a same type; setting a finalgap value for each of the first and second food products to be the samebased on the identifying the first and second food products as being ofthe same type; and controlling at least one of the pressure or the rateof ascent of the lower heating plate to cook the first food product forlonger than the second food product.
 4. The method of claim 1, whereincontrolling the rate of ascent of the lower heating plate furthercomprises adjusting the pressure applied to a food product resting uponthe lower heating plate by ascent of the lower heating plate toward theupper heating plate based on the calculated difference between theinitial gap value and the predefined final gap value.
 5. The method ofclaim 1, further comprising controlling the pressure applied to a foodproduct resting upon the lower heating plate by ascent of the lowerheating plate toward the upper heating plate until the predefined gapvalue is reached.
 6. A cooking apparatus, comprising: a base including alower heating plate; an upper heating unit including an upper heatingplate; and a controller configured to detect a food product on the lowerheating plate with at least one sensor, wherein the sensor is one of aphoto sensor, an optical sensor, an acoustic sensor, or a video sensor,identify an initial thickness of the detected food product on the lowerheating plate of the cooking apparatus, calculate whether a differenceexists between an initial gap value corresponding to the initialthickness of the food product and a predefined final gap value, and whenthe step of calculating the difference between the initial gap valuecorresponding to the initial thickness of the food product and thepredefined final gap value is complete, adjusting the position of thelower heating plate with respect to an upper heating plate to result incompression of the food product disposed upon the lower heating plateuntil there is no longer a difference between the thickness of the foodproduct and the predefined final gap value, and controlling a rate ofascent of the lower heating plate toward the upper heating plate basedon the calculated difference between the initial gap value and thepredefined final gap value, controlling the rate of ascent of the lowerheating plate until the predefined gap value is reached; and sensingthat the food product has been cooked based upon a combination of thepredetermined final gap value being reached and the predetermined cooktime being elapsed.
 7. The cooking apparatus of claim 6, furthercomprising at least one food product sensor configured to detect theinitial thickness of the food product and transmit a corresponding foodproduct sensor signal to the controller.
 8. The cooking apparatus ofclaim 7, wherein controlling the rate of ascent of the lower heatingplate includes adjusting the rate of ascent of the lower heating platetoward the upper heating plate based on the calculated differencebetween the initial gap value and the predefined gap value.
 9. Thecooking apparatus of claim 6, further comprising an accelerometer todetect the rate of ascent of the lower heating plate.
 10. The cookingapparatus of claim 9, wherein further comprising controlling thepressure applied to a food product resting upon the lower heating plateby ascent of the lower heating plate toward the upper heating plate andcontrolling the rate of ascent of the lower heating plate includescontrolling at least one of a motor and an actuator to adjust thepressure of at least one of the upper heating plate and the lowerheating plate on the food product based on the calculated differencebetween the initial gap value and the predefined final gap value. 11.The cooking apparatus of claim 6, wherein identifying the initialthickness of the food product includes identifying the initial thicknessof a first food product and a second food product, the first foodproduct having a thickness greater than the second food product, andcontrolling the rate of ascent of the lower heating plate includescontrolling at least one of a motor or an actuator to adjust the rate ofascent to cook the first food product for a period of time longer thanthe second food product.
 12. The cooking apparatus of claim 11, whereinthe controller is configured to control at least one of a motor and anactuator to control the rate of ascent of the lower heating plate untilthe predefined gap value is reached, and the controller is configured tomaintain the upper heating plate and the lower heating plate in positionafter the predefined gap value is reached until a predetermined cookcycle ending condition is detected.